package tirtilcam.view;

import java.awt.Color;
import java.awt.Component;
import java.awt.event.ActionListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

import javax.swing.BorderFactory;
import javax.swing.JPanel;

public class TirtilCamPanel extends JPanel implements MouseListener
{

	private Component m_parent;
	private String m_title;

	public TirtilCamPanel(String p_title, Component p_parent)
	{
	    
		setBorder(BorderFactory.createTitledBorder(p_title));	
		m_title = p_title;
		m_parent = p_parent;
		
		addMouseListener(this);
		//set
	}

	
	public void highLightBackGround()
	{
	    this.setBackground(Color.red);
	}
	
	public void switchOffBackGround()
	{
	    this.setBackground(Color.lightGray);
	}


	@Override
	public void mouseClicked(MouseEvent e) 
	{
	   System.out.println("mouseClicked inside " + m_title);
	    
	}


	@Override
	public void mouseEntered(MouseEvent e) {
		   System.out.println("mouseEntered inside " + m_title);
	    
	}


	@Override
	public void mouseExited(MouseEvent e) {
		   System.out.println("mouseExited inside " + m_title);
	    
	}


	@Override
	public void mousePressed(MouseEvent e) {
		   System.out.println("mousePressed inside " + m_title);
	    
	}


	@Override
	public void mouseReleased(MouseEvent e) {
		   System.out.println("mouseReleased inside " + m_title);
	    
	}
	
	
	
}
